package com.jlastu.androiduidemo.views;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Toast;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.jlastu.androiduidemo.R;
import com.jlastu.androiduidemo.widget.HeaderView;

public class Add_student extends AppCompatActivity {

    private HeaderView mHeaderview3;
    private Button mb3;
    private Button madd_student;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.add_student);
        madd_student=findViewById(R.id.add_student);
        mHeaderview3=findViewById(R.id.header_view3);
        mHeaderview3.setTitle("添加学生");
        mHeaderview3.setleft(R.drawable.back);

        mb3=findViewById(R.id.b3);
        mb3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onBackPressed();
            }
        });


        madd_student.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                if () {
                Toast.makeText(Add_student.this, "添加成功", Toast.LENGTH_SHORT).show();
                Intent intent=new Intent(Add_student.this, SettingsActivity.class);
                startActivity(intent);
//                }
//                else {
//                    Toast.makeText(Edit.this, "所有项都不可为空", Toast.LENGTH_SHORT).show();
//                }
            }
        });


    }

}